/* eslint-disable */
import Vue from 'vue'
import Router from 'vue-router'
import PageTransition from '../views/components/PageTransition'
import Home from "../views/home/Home"
import Login from "../views/login/Login"
import WGRK from "../views/kd/wgrk/WGRK"


Router.prototype.goBack = function () {
  this.isBack = true
  window.history.go(-1)
}
Vue.use(Router)



export default new Router({
  routes: [

    {
      path: '/',
      name: 'PageTransition',
      component: PageTransition,
      children: [{
        path: '/login',
        component: Login
      },
      {
        path: '/home',
        component: Home
      },
      {
        path: '/wgrk',
        component: WGRK
      },]
    }

    // {
    //   path: '/detail/:id',
    //   name: 'Detail',
    //   component: Detail,
    //   meta: {
    //     keepAlive: false // 需要被缓存
    //   }
    // }
  ],
  scrollBehavior(to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})
